<?php
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of PersonWorkclass
 *
 * @author adhamhelal
 */
class PersonInfoPanel extends QPanel{
	protected $mctPerson;
        protected $mctAddress;


        //Controls
        public $lblRecordId;
        
        protected $lblAddressId;
        protected $lblAddressCreateBy;
	protected $lblAddressCreateDate;
	protected $lblAddressUpdateBy;
	protected $lblAddressUpdateDate;

        protected $lblPersonId;
        protected $lblPersonCreateBy;
	protected $lblPersonCreateDate;
	protected $lblPersonUpdateBy;
	protected $lblPersonUpdateDate;
        
       public function __construct($objParentObject, $mctPerson, $mctAddress, $strControlId = null) {
                // Call the Parent
                try {
                        parent::__construct($objParentObject, $strControlId);
                } catch (QCallerException $objExc) {
                        $objExc->IncrementOffset();
                        throw $objExc;
                }

                // Setup Template
                $this->strTemplate = __DOCROOT__.__PERSON__ .  '/tpl/qpanel.tpl.php';

                // Set the Meta Conrol
                $this->mctPerson = $mctPerson;
                $objPerson = $this->mctPerson->__get('Person');
                

                $this->lblPersonId = $this->mctPerson->lblId_Create();
                $this->lblPersonId->Name = QApplication::Translate("Person: Id");
                $this->lblPersonId->SetParentControl($this);

                $this->lblPersonCreateBy = $this->mctPerson->lblCreateBy_Create();
                $this->lblPersonCreateBy->Name = QApplication::Translate("Person: Created By");
                $this->lblPersonCreateBy->SetParentControl($this);

                $this->lblPersonCreateDate = $this->mctPerson->lblCreateDate_Create(null,QDateTime::FormatDisplayDateTimeFull);
                $this->lblPersonCreateDate->Name = QApplication::Translate("Person: Created Date");
                $this->lblPersonCreateDate->SetParentControl($this);

                $this->lblPersonUpdateBy = $this->mctPerson->lblUpdateBy_Create();
                $this->lblPersonUpdateBy->Name = QApplication::Translate("Person: Update By");
                $this->lblPersonUpdateBy->SetParentControl($this);

                $this->lblPersonUpdateDate = $this->mctPerson->lblUpdateDate_Create(null,QDateTime::FormatDisplayDateTimeFull);
                $this->lblPersonUpdateDate->Name = QApplication::Translate("Person: Update Date");
                $this->lblPersonUpdateDate->SetParentControl($this);
                
                $this->mctAddress= $mctAddress;

                $this->lblAddressId = $this->mctAddress->lblId_Create();
                $this->lblAddressId->Name = QApplication::Translate("Address: Id");
                $this->lblAddressId->SetParentControl($this);

                $this->lblAddressCreateBy = $this->mctAddress->lblCreateBy_Create();
                $this->lblAddressCreateBy->Name = QApplication::Translate("Address: Created By");
                $this->lblAddressCreateBy->SetParentControl($this);

                $this->lblAddressCreateDate = $this->mctAddress->lblCreateDate_Create(null,QDateTime::FormatDisplayDateTimeFull);
                $this->lblAddressCreateDate->Name = QApplication::Translate("Address: Created Date");
                $this->lblAddressCreateDate->SetParentControl($this);

                $this->lblAddressUpdateBy = $this->mctAddress->lblUpdateBy_Create();
                $this->lblAddressUpdateBy->Name = QApplication::Translate("Address: Update By");
                $this->lblAddressUpdateBy->SetParentControl($this);

                $this->lblAddressUpdateDate = $this->mctAddress->lblUpdateDate_Create(null,QDateTime::FormatDisplayDateTimeFull );
                $this->lblAddressUpdateDate->Name = QApplication::Translate("Address: Update Date");
                $this->lblAddressUpdateDate->SetParentControl($this);

                }

    public function Validate() {
        $blnToReturn = true;


        return $blnToReturn;
    }




}
?>

